# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=grantlee-editor
pkgver=23.08.4
pkgrel=0
pkgdesc="Utilities and tools to manage themes in KDE PIM applications "
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://kontact.kde.org/"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	akonadi-mime-dev
	extra-cmake-modules
	grantleetheme-dev
	karchive5-dev
	kcrash5-dev
	kdbusaddons5-dev
	kdoctools5-dev
	kimap-dev
	knewstuff5-dev
	kpimtextedit-dev
	ktexteditor5-dev
	kxmlgui5-dev
	libkleo-dev
	messagelib-dev
	pimcommon-dev
	qgpgme
	qt5-qtbase-dev
	qt5-qtwebengine-dev
	samurai
	syntax-highlighting5-dev
	"
_repo_url="https://invent.kde.org/pim/grantlee-editor.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/grantlee-editor-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f283859e85a7b615ec7bada20bd84822cb457790373ccee370c4ce9b0fb98e4ec25c02ce4132a512e2826f93410bfa9bbb6755eec0fe1b62b0e6287fd701541d  grantlee-editor-23.08.4.tar.xz
"
